package com.woniuxy.crm.entity;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

@Setter
@Getter
public class Category {
    private String name;
    private int id;

    public Category() {
    }

    public Category(String name, int id) {
        this.id = id;
        this.name = name;
    }

    public void add(Category category) {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Category category = (Category) o;
        return id == category.id && Objects.equals(name, category.name);
    }
    @Override
    public  String toString(){
        return "类别ID："+id+"类别名字："+name;
    }



}


